home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / Videotoolbox 96-08-22-c.sit / VideoToolbox / VideoToolboxSources / TrapAvailable.c < prev    next >
MacBinary  |  1995-07-27  |  1.5 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: TrapAvailable.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jul 27 02:00:03 1995, modified Thu Jul 27 02:00:03 1995, creator 'CWIE', type ASCII, 860 bytes "TrapAvailable.c" , at 0x3dc 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 54 72 61 70 41 76 | 61 69 6c 61 62 6c 65 2e |..TrapAv|ailable.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 03 5c 00 | 00 01 9a ac 3c db e3 ac |......\.|....<...|
|00000060| 3c db e3 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |<.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 94 3a 00 00 |........|.....:..|
|00000080| 2f 2a 0d 54 72 61 70 41 | 76 61 69 6c 61 62 6c 65 |/*.TrapA|vailable|
|00000090| 2e 63 0d 46 72 6f 6d 20 | 41 70 70 6c 65 2e 20 53 |.c.From |Apple. S|
|000000a0| 69 6d 70 6c 79 20 69 6e | 63 6c 75 64 65 20 3c 54 |imply in|clude <T|
|000000b0| 72 61 70 73 2e 68 3e 20 | 69 6e 20 79 6f 75 72 20 |raps.h> |in your |
|000000c0| 70 72 6f 67 72 61 6d 20 | 61 6e 64 20 63 61 6c 6c |program |and call|
|000000d0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 74 6f | this ro|utine to|
|000000e0| 20 66 69 6e 64 0d 6f 75 | 74 20 77 68 65 74 68 65 | find.ou|t whethe|
|000000f0| 72 20 61 6e 79 20 70 61 | 72 74 69 63 75 6c 61 72 |r any pa|rticular|
|00000100| 20 74 72 61 70 20 69 73 | 20 61 76 61 69 6c 61 62 | trap is| availab|
|00000110| 6c 65 2e 0d 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 20 |le..*/.#|include |
|00000120| 22 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 22 |"VideoTo|olbox.h"|
|00000130| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 54 52 41 50 53 |.#ifndef| __TRAPS|
|00000140| 5f 5f 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 54 72 |__..#inc|lude <Tr|
|00000150| 61 70 73 2e 68 3e 0d 23 | 65 6e 64 69 66 0d 0d 2f |aps.h>.#|endif../|
|00000160| 2f 20 74 68 65 73 65 20 | 61 72 65 20 66 6f 72 20 |/ these |are for |
|00000170| 69 6e 74 65 72 6e 61 6c | 20 75 73 65 20 6f 6e 6c |internal| use onl|
|00000180| 79 0d 73 68 6f 72 74 20 | 4e 75 6d 54 6f 6f 6c 62 |y.short |NumToolb|
|00000190| 6f 78 54 72 61 70 73 28 | 76 6f 69 64 29 3b 09 09 |oxTraps(|void);..|
|000001a0| 0d 54 72 61 70 54 79 70 | 65 20 47 65 74 54 72 61 |.TrapTyp|e GetTra|
|000001b0| 70 54 79 70 65 28 73 68 | 6f 72 74 20 74 68 65 54 |pType(sh|ort theT|
|000001c0| 72 61 70 29 3b 0d 09 0d | 42 6f 6f 6c 65 61 6e 09 |rap);...|Boolean.|
|000001d0| 54 72 61 70 41 76 61 69 | 6c 61 62 6c 65 28 73 68 |TrapAvai|lable(sh|
|000001e0| 6f 72 74 20 74 68 65 54 | 72 61 70 29 0d 7b 0d 09 |ort theT|rap).{..|
|000001f0| 54 72 61 70 54 79 70 65 | 20 74 54 79 70 65 3b 0d |TrapType| tType;.|
|00000200| 09 0d 09 74 54 79 70 65 | 3d 47 65 74 54 72 61 70 |...tType|=GetTrap|
|00000210| 54 79 70 65 28 74 68 65 | 54 72 61 70 29 3b 0d 09 |Type(the|Trap);..|
|00000220| 69 66 28 74 54 79 70 65 | 3d 3d 54 6f 6f 6c 54 72 |if(tType|==ToolTr|
|00000230| 61 70 29 7b 0d 09 09 74 | 68 65 54 72 61 70 20 26 |ap){...t|heTrap &|
|00000240| 3d 20 30 78 30 37 46 46 | 3b 0d 09 09 69 66 28 74 |= 0x07FF|;...if(t|
|00000250| 68 65 54 72 61 70 3e 3d | 4e 75 6d 54 6f 6f 6c 62 |heTrap>=|NumToolb|
|00000260| 6f 78 54 72 61 70 73 28 | 29 29 74 68 65 54 72 61 |oxTraps(|))theTra|
|00000270| 70 3d 5f 55 6e 69 6d 70 | 6c 65 6d 65 6e 74 65 64 |p=_Unimp|lemented|
|00000280| 3b 0d 09 7d 0d 09 72 65 | 74 75 72 6e 20 4e 47 65 |;..}..re|turn NGe|
|00000290| 74 54 72 61 70 41 64 64 | 72 65 73 73 28 74 68 65 |tTrapAdd|ress(the|
|000002a0| 54 72 61 70 2c 74 54 79 | 70 65 29 20 21 3d 20 4e |Trap,tTy|pe) != N|
|000002b0| 47 65 74 54 72 61 70 41 | 64 64 72 65 73 73 28 5f |GetTrapA|ddress(_|
|000002c0| 55 6e 69 6d 70 6c 65 6d | 65 6e 74 65 64 2c 54 6f |Unimplem|ented,To|
|000002d0| 6f 6c 54 72 61 70 29 3b | 0d 7d 0d 0d 73 68 6f 72 |olTrap);|.}..shor|
|000002e0| 74 20 4e 75 6d 54 6f 6f | 6c 62 6f 78 54 72 61 70 |t NumToo|lboxTrap|
|000002f0| 73 28 76 6f 69 64 29 0d | 7b 0d 09 69 66 20 28 4e |s(void).|{..if (N|
|00000300| 47 65 74 54 72 61 70 41 | 64 64 72 65 73 73 28 5f |GetTrapA|ddress(_|
|00000310| 49 6e 69 74 47 72 61 66 | 2c 54 6f 6f 6c 54 72 61 |InitGraf|,ToolTra|
|00000320| 70 29 20 3d 3d 20 4e 47 | 65 74 54 72 61 70 41 64 |p) == NG|etTrapAd|
|00000330| 64 72 65 73 73 28 30 78 | 41 41 36 45 2c 54 6f 6f |dress(0x|AA6E,Too|
|00000340| 6c 54 72 61 70 29 29 0d | 09 09 72 65 74 75 72 6e |lTrap)).|..return|
|00000350| 20 30 78 30 32 30 30 3b | 0d 09 65 6c 73 65 20 72 | 0x0200;|..else r|
|00000360| 65 74 75 72 6e 20 30 78 | 30 34 30 30 3b 0d 7d 0d |eturn 0x|0400;.}.|
|00000370| 0d 0d 54 72 61 70 54 79 | 70 65 20 47 65 74 54 72 |..TrapTy|pe GetTr|
|00000380| 61 70 54 79 70 65 28 73 | 68 6f 72 74 20 74 68 65 |apType(s|hort the|
|00000390| 54 72 61 70 29 0d 7b 0d | 09 69 66 28 28 74 68 65 |Trap).{.|.if((the|
|000003a0| 54 72 61 70 20 26 20 30 | 78 30 38 30 30 29 3e 30 |Trap & 0|x0800)>0|
|000003b0| 29 20 72 65 74 75 72 6e | 20 54 6f 6f 6c 54 72 61 |) return| ToolTra|
|000003c0| 70 3b 0d 09 65 6c 73 65 | 20 72 65 74 75 72 6e 20 |p;..else| return |
|000003d0| 4f 53 54 72 61 70 3b 0d | 7d 0d 0d 0d 00 00 00 00 |OSTrap;.|}.......|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000410| 69 74 79 29 3b 0d 09 72 | 65 74 75 72 6e 20 30 3b |ity);..r|eturn 0;|
|00000420| 0d 23 65 6c 73 65 0d 09 | 73 74 61 72 74 3b 63 6f |.#else..|start;co|
|00000430| 0f 54 72 61 70 41 76 61 | 69 6c 61 62 6c 65 2e 63 |.TrapAva|ilable.c|
|00000440| 02 00 00 00 54 45 58 54 | 43 57 49 45 01 00 00 28 |....TEXT|CWIE...(|
|00000450| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 28 06 00 |..TEXTCW|IE...(..|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a6 bc 36 2a 00 00 | 03 5c 00 00 01 9a 72 65 |....6*..|.\....re|
|00000480| 76 65 6e 74 20 22 75 6e | 75 73 65 64 20 61 72 67 |vent "un|used arg|
|00000490| 75 6d 65 6e 74 22 20 77 | 61 72 6e 69 6e 67 0d 09 |ument" w|arning..|
|000004a0| 72 65 74 75 72 6e 20 31 | 3b 0d 23 65 6e 64 69 66 |return 1|;.#endif|
|000004b0| 0d 7d 0d 2f 2f 20 48 69 | 67 68 20 72 65 73 6f 6c |.}.// Hi|gh resol|
|000004c0| 75 74 69 6f 6e 20 76 69 | 64 65 6f 20 63 61 72 64 |ution vi|deo card|
|000004d0| 0d 2f 2f 23 64 65 66 69 | 6e 65 20 48 52 56 43 42 |.//#defi|ne HRVCB|
|000004e0| 61 73 65 09 09 09 30 78 | 38 30 30 30 30 0d 23 64 |ase...0x|80000.#d|
|000004f0| 65 66 69 6e 65 20 48 52 | 56 43 43 6c 75 74 41 64 |efine HR|VCClutAd|
|00000500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 03 | 00 04 00 3d 00 0a 01 d7 |........|...=....|
|00000530| 02 80 00 3d 00 0a 01 d7 | 02 80 ac 3c a3 c7 00 00 |...=....|...<....|
|00000540| 00 d6 00 00 00 d6 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00000550| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000560| 00 00 00 46 01 99 5f e8 | 21 0e 00 00 00 1c 00 46 |...F.._.|!......F|
|00000570| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000580| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000590| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+